Skip to content

Added Universal Module Definition #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Added Universal Module Definition #145

wants to merge 2 commits into from

Conversation

Grafikart
Copy link

Added the feature discussed in the issue #144, the goal is to be able to publish outdated-browser on npmjs without affecting current way of doing things

Gulp for compilation

To minify and jshint file I created a gulp configuration with two tasks

  • default to minify js / css
  • server to serve the demo (localhost:3001/demo) and watch files (editing the js will minify it)

File structure

The goal is to make the directory easier to understand putting all the files needed in a dist directory.

├── demo/
│   └── index.html
├── dist/
│   └── outdatedbrowser.js
│   └── outdatedbrowser.css
│   └── lang/
├── src/
│   └── outdatedbrowser.js
│   └── outdatedbrowser.css

If you don't like this idea, you can tell me and I'll revert back to what it was

Added a new "force" option

I noticed in your demo that you had no way to force outdatedbrowser.js so I added a new option to force it. It can be usefull if some people willing to check custom with additional librairies (modernizr for instance)

In my opinion it could be interesting to add a new option to create a custom support method (just an idea)

Added module loader support

This was the main goal of this PR, I used umd (Universal Module Definition) to make outdatedbrowser loadable with requirejs or browserify.

I didn't published the plugin on npm cause you are the author (and maybe you want to keep the control), but I can do it if you want if this code is merged with master)

Sorry for my English :(

@Grafikart
Copy link
Author

Someone else did a package for it (not needed anymore)

@Grafikart Grafikart closed this Sep 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant